package com.novel.entiy.vo;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;

/**
 * 章节表
 *
 * @author chihuo
 * @date 2022/4/7
 */
@ApiModel(value = "章节")
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "chapter")
public class ChapterVO {

    @JsonSerialize(using = ToStringSerializer.class)
    @ApiModelProperty(value = "")
    private Long id;

    /**
     * 文章id
     */
    @JsonSerialize(using = ToStringSerializer.class)
    @ApiModelProperty(value = "文章id")
    private Long novelId;

    /**
     * 章节名称
     */
    @ApiModelProperty(value = "章节名称")
    private String chapterName;

    /**
     * 章节号
     */
    @ApiModelProperty(value = "章节号")
    private Integer chapterNo;

    /**
     * 章节字数
     */
    @JsonSerialize(using = ToStringSerializer.class)
    @ApiModelProperty(value = "章节字数")
    private Long wordNums;

    /**
     * 0:草稿 1:发布
     */
    @ApiModelProperty(value = "0:草稿 1:发布")
    private Integer status;

    /**
     * 创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @ApiModelProperty(value = "创建时间")
    private Date createdTime;

    /**
     * 更新时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @ApiModelProperty(value = "更新时间")
    private Date updatedTime;

}